-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
976 redirect to calculator page after creation #980
976 redirect to calculator page after creation #980
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## calculators-constructor #980 +/- ##
========================================================
Coverage 86.74% 86.74%
========================================================
Files 68 68
Lines 1056 1056
========================================================
Hits 916 916
Misses 140 140 ☔ View full report in Codecov by Sentry. |
spec/requests/calculators_spec.rb
Outdated
@@ -67,7 +67,8 @@ | |||
post account_calculators_path, params: { calculator: valid_attributes } | |||
end.to change(Calculator, :count).by(1) | |||
|
|||
expect(response).to redirect_to(account_calculators_path) | |||
calculator = Calculator.last |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ну що це таке? Я вже не один раз казав, що ми НІКОЛИ не використовуємо змінні у тестах
spec/requests/calculators_spec.rb
Outdated
@@ -67,7 +67,7 @@ | |||
post account_calculators_path, params: { calculator: valid_attributes } | |||
end.to change(Calculator, :count).by(1) | |||
|
|||
expect(response).to redirect_to(account_calculators_path) | |||
expect(response).to redirect_to(account_calculator_path(slug: Calculator.last)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use let for last calculator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
порізолвай конфлікти
…r-page-after-creation
Code reviewers
Second Level Review
Summary of issue
After creation, the program should transfer to the page of this calculator in the admin panel
Summary of change
Created show page for calculator on admin, added redirect
CHECK LIST